import React from "react";
import styles from "./index.module.less";
import notFound1 from "@images/notFound.png";
import notFound2 from "@images/404.png";
import { useNavigate } from "react-router-dom";

const Page404: React.FC = () => {
    const navigate = useNavigate();
    return (
        <div className={styles.notFound}>
            <img src={notFound1} alt="404" className={styles.img1} />
            <br />
            <img src={notFound2} alt="notFound" className={styles.img2} />
            <div
                className={styles.toIndex}
                onClick={() => {
                    navigate(
                        window.location.pathname.includes("/m")
                            ? "/m/mall/goodsRecommend"
                            : "/"
                    );
                }}
            >
                返回首页
            </div>
        </div>
    );
};

export default Page404;
